rm *.tar.gz *.ctrl

version=`date +%s`
echo $version > /opt/seqiot/dists/ftm100/home/.nversion
tar -zcf release.tar.gz -C /opt/seqiot/dists/ftm100 home

md5=`md5sum release.tar.gz | awk '{ print $1 }'`
cat fw_update.template |sed "s/{md5}/${md5}/g" |sed "s/{version}/${version}/g" > fw_update.ctrl
